﻿<div>

<h2>JavaScript 代码：</h2>
<textarea name="dp-syntaxhighlighter" class="brush: js; highlight: [5,6,13,17,21]" >
    
    $(function () {
        var required = false,
            cc = $("#cc").combobox({
            width: 120,
            prompt: '请输入内容...',
            iconCls: 'icon-ok',
            editable: false,
            required: required,
            value: null
        });

        $("#Button1").click(function () {
            cc.combobox("setIcon", "icon-search");
        });

        $("#Button2").click(function () {
            cc.combobox("setRequired", required = !required).combobox("validate");
        });

        $("#Button3").click(function () {
            cc.combobox("setPrompt", "icon-search");
        });
    });

</textarea>
<h2>HTML 代码：</h2>
<textarea name="dp-syntaxhighlighter" class="brush: html; highlight: []" >
    
    <input id="Button1" type="button" value="设置图标" />
    <input id="Button2" type="button" value="设置 Required 值" />
    <input id="Button3" type="button" value="设置输入提示文字" />
    <hr />
    <select id="cc"></select>

</textarea>


</div>